
/*
//初始化提交人
function iUser(value,row,index){
    return value.name;
}*/



$(function () {
    var re_datagrid = $("#re_datagrid");
    //兑换列表初始化
    re_datagrid.datagrid({
        fit:true,
        fitColumns:true,
        striped:true,
        url:"/recordExchange/list.do",
        pagination:true,
        rownumbers:true,
        singleSelect:true,
        toolbar:"#tb",
        columns:[[
            {field:"cb", checkbox:true},
            {field:"id", hidden:true},
            {field:"name", title:"会员姓名", width:80},
            {field:"prename", title:"所选商品", width:80},
            {field:"preintegral", title:"消耗积分", width:80},
            {field:"balance", title:"剩余积分", width:80},
            {field:"inputTime", title:"提交时间", width:80},
        ]]
    })
    //end


    var cmdObj= {
        //刷新
        reload: function () {
            re_datagrid.datagrid("reload");
        }
    }

    //给按钮绑定事件
    $("a[data-cmd]").click(function () {
        var cmd = $(this).data("cmd");
        cmdObj[cmd]();
    })


})















